﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AlbumUp.aspx.cs" Inherits="Yu.Cms.Web.Admin.AlbumUp" %>

<%@ Register Src="../UserCtrl/Admin/AlbumUp.ascx" TagName="AlbumUp" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="style/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
    <script type="text/javascript" src="/common/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="style/js/ajaxfileupload.js"></script>
    <script type="text/javascript" language="javascript">
        function ajaxFileUpload() {
            $("#loading")
		.ajaxStart(function() {
		    $(this).show();
		})
		.ajaxComplete(function() {
		    $(this).hide();
		});

		$.ajaxFileUpload(
			{
			    url: 'doUpload.aspx',
			    secureuri: false,
			    fileElementId: 'fileToUpload',
			    dataType: 'json',
			    success: function(data, status) {
			        if (typeof (data.error) != 'undefined') {
			            if (data.error != '') {
			                alert(data.error);
			            } else {
			                alert(data.msg);			                
			                //tb_remove(); //关闭
			                location.href = 'AlbumListD.aspx?Act=Add';
			            }
			        }
			    },
			    error: function(data, status, e) {
			        alert(e);
			    }
			});           
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">    
    上传文件<br />
    <p>
    <input id="fileToUpload" type="file"  name="fileToUpload" runat="server" />
    <input id="BigID" type="hidden" name="BigID" value='aa' />
  
    </p>
    <p>       
       <button type="button" value="" id="buttonUpload" onClick="ajaxFileUpload();"><span><span>上 传</span></span><div></div></button>
       <button type="button" value="" onClick="tb_remove();"><span><span>取 消</span></span><div></div></button>
       </p>
      <img id="loading" src="style/box/loadingAnimation.gif" style="display: none;" />
    </form>
</body>
</html>
